var should = require('should');
var openLimitBuyHandler = require('../../../app/servers/activity/handler/openLimitBuyHandler');
var config = require('../../config');
var configUtil = require('../../../app/util/configUtil');
var analyze = require('kc-analyze');

suite('测试openLimitBuyHandler', function () {
    suite('reward', function () {
        test('初始化', function (done) {
            var analyze_config = configUtil.load('analyze');
            var game_config = configUtil.load('game');
            analyze.initialize({
                host: analyze_config.host,
                server_id: game_config.server_id
            });
            done();
        });

        test('开服限购', function (done) {
            var msg = {};
            var session = {};
            session.uid = config.other_role_id;

            var open_limit_buy_handler = new openLimitBuyHandler();
            open_limit_buy_handler.buy(msg, session, function (err, res) {
                // res.code.should.equal(200); //未提供参数
                // console.log('res:', res);
                done();
            });
        });
    });
});
